using System;
using System.Collections.Generic;
using System.Net.Mail;
using BusinessLogic.Customer;
using OpenPop.Mime;
namespace BusinessLogic.Messages
{
    /// <summary>
    /// Message service
    /// </summary>
    public partial interface IMessageService
    {
        /// <summary>
        /// Sends an email
        /// </summary>
        /// <param name="subject">Subject</param>
        /// <param name="body">Body</param>
        /// <param name="from">From</param>
        /// <param name="to">To</param>
        /// <param name="emailAccount">Email account to use</param>
        void SendEmail(string subject, string body, string from, string to, 
            EmailAccount emailAccount);

        /// <summary>
        /// Sends an email
        /// </summary>
        /// <param name="subject">Subject</param>
        /// <param name="body">Body</param>
        /// <param name="from">From</param>
        /// <param name="to">To</param>
        /// <param name="emailAccount">Email account to use</param>
        void SendEmail(string subject, string body, MailAddress from,
            MailAddress to, EmailAccount emailAccount);

        /// <summary>
        /// Sends an email
        /// </summary>
        /// <param name="subject">Subject</param>
        /// <param name="body">Body</param>
        /// <param name="from">From</param>
        /// <param name="to">To</param>
        /// <param name="bcc">BCC</param>
        /// <param name="cc">CC</param>
        /// <param name="emailAccount">Email account to use</param>
        void SendEmail(string subject, string body,
            MailAddress from, MailAddress to, List<string> bcc, 
            List<string> cc, EmailAccount emailAccount);

        /// <summary>
        /// Gets or sets a primary store currency
        /// </summary>
        EmailAccount DefaultEmailAccount { get; set; }
        #region ReceiveMails
        /// <summary>
        /// Gets the message.
        /// </summary>
        /// <param name="popServer">The pop server.</param>
        /// <param name="port">The port.</param>
        /// <param name="useSsl">if set to <c>true</c> [use SSL].</param>
        /// <param name="login">The login.</param>
        /// <param name="password">The password.</param>
        /// <returns></returns>
        Dictionary<int, Message> GetMessage(string popServer, int port, bool useSsl, string login, string password);
        /// <summary>
        /// Fetches the unseen messages.
        /// </summary>
        /// <param name="hostname">The hostname.</param>
        /// <param name="port">The port.</param>
        /// <param name="useSsl">if set to <c>true</c> [use SSL].</param>
        /// <param name="username">The username.</param>
        /// <param name="password">The password.</param>
        /// <param name="seenUids">The seen uids.</param>
        /// <returns></returns>
        List<Message> FetchUnseenMessages(string hostname, int port, bool useSsl, string username, string password, List<string> seenUids);

        #endregion
    }
}